#ifndef DIFFDIALOG_H
#define DIFFDIALOG_H

#include <QDialog>
#include <QSqlDatabase>
#include <QListWidget>
#include <QTextEdit>
#include <QDialogButtonBox>
#include <QPushButton>

class DatabaseDiff;
struct DatabaseDifference;

class DiffDialog : public QDialog
{
    Q_OBJECT

public:
    explicit DiffDialog(const QSqlDatabase &db, QWidget *parent = nullptr);
    
private slots:
    void compareDatabases();
    void showDifferenceDetails();
    void saveReport();

private:
    void setupUI();
    void loadDatabases();
    
    QSqlDatabase m_database;
    QListWidget *m_databaseList;
    QPushButton *m_compareButton;
    QPushButton *m_detailsButton;
    QPushButton *m_saveButton;
    QTextEdit *m_resultText;
    QDialogButtonBox *m_buttonBox;
    
    DatabaseDiff *m_databaseDiff;
    DatabaseDifference m_currentDiff;
};

#endif // DIFFDIALOG_H